<?php
namespace app\api\controller\tbk;
class Tbkcat extends Base
{
    //分类
    public function lists(){
			if(is_post()){
					$d = $this->post;
					$map = [['and','status','=',0],['and','user_id','=',$d['uid']]];
					$w  = where($map);
					$sql = "select * from tbk_cat $w[0] order by sort desc,id desc".limit($d['page'],$d['limit']);
					$rs = $this->db->query($sql, $w[1],'',true);
					if($rs){
						suc($rs[0],$rs[1]);
					}else{
						suc([],0);
					}
			}
    }
}
